#ifndef __MAINGAME_SCENE_H__
#define __MAINGAME_SCENE_H__

#include "cocos2d.h"
#include "SimpleAudioEngine.h"
#include "Score.h"
#include "EnemyManager.h"
#include "BulletManager.h"
#include "ToothManager.h"
#include "WaveManager.h"
#include "Player.h"
#include "GameUtil.h"
#include "GameStateLayer.h"
#include "GameUpgradeScene.h"

using namespace cocos2d;

class MainGameScene : public CCLayer
{
public:
	~MainGameScene(void);

    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    bool init(CCScene* scene);  

    // there's no 'id' in cpp, so we recommand to return the exactly class pointer
    static CCScene* scene();

	void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
	//void shootBullet(CCPoint from, CCPoint to);
	//void spriteMoveFinished(CCNode* node);
	void update(float dt);
	//void checkCollision();
protected:
	//CCCannon* m_pCannon;
private:
	EnemyManager* _enemyManager;
	BulletManager* _bulletManager;
	ToothManager* _toothManager;
	WaveManager* _waveManager;
	GameStateLayer *_gameStateLayer;
	GameUpgradeScene *_gameUpgradeLayer;

	CCSize _winSize;
	//Score* _score;

	void keyBackClicked();	

	int d_touchID;
	Player* d_Player;
};

#endif  // __MAINGAME_SCENE_H__
